<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "../head.html"/>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("请选择您要操作的数据");
		return;
	}
	if(!confirm("您确定删除吗？")) {
		return;
	}
	var f = getTableForm();
	f.action="v_delete.do";
	f.submit();
}
function optQuery(){
  if($("#query").is(":hidden")){
   $("#query").show();
   return;
  }
  if($("#query").is(":visible")){
   $("#query").hide();
  }
}
</script>
</head>
<body>
<div class="box-positon">
	<div class="rpos">当前位置: 房屋数据 - 列表</div>
	<form class="ropt">
		<input class="add" type="submit" value="添加" onclick="this.form.action='v_add.do';"/>
		<input class="query" type="button" value="查询" onclick="optQuery();"/>
	</form>
	<div class="clear"></div>
</div>
<div class="body-box">
<form method="post" action="v_list.do" id="query" style="display: none;">
<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" border="0">
<tr>
<td colspan="8" style="background-color: #e6f2fe;text-align: center;padding-right: 3px;color: #000;height: 27px;">条件查询</td>
</tr>
<tr>
    <td width="10%" class="pn-flabel pn-flabel-h">楼盘名称：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="name" style="width:150px"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">区域：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="area" style="width:150px"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">出卖人：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="seller" style="width:150px"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">许可证：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="license" style="width:150px"/></td>
</tr>
<tr>
    <td width="10%" class="pn-flabel pn-flabel-h">用途：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="use" style="width:150px"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">形态：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="building" style="width:150px"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">开始时间：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="begin" style="width:150px" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></td>
    <td width="10%" class="pn-flabel pn-flabel-h">结束时间：</td>
    <td colspan="1" width="15%" class="pn-fcontent"><input type="text" name="end" style="width:150px" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></td>
</tr>
<tr>
<td colspan="8" class="pn-fbutton">
	<input type="submit" value="查询" class="submit" class="submit"/> &nbsp; 
	<input type="reset" value="重置" class="reset" class="reset"/>
</td>
</tr>
</table>
</form>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="${pageNo!}"/>
<input type="hidden" name="name" value="${name!}"/>
<input type="hidden" name="area" value="${area!}"/>
<input type="hidden" name="seller" value="${seller!}"/>
<input type="hidden" name="license" value="${license!}"/>
<input type="hidden" name="use" value="${use!}"/>
<input type="hidden" name="building" value="${building!}"/>
<table class="pn-ltable" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
<thead class="pn-lthead">
<tr>
    <th width="20"><input type='checkbox' onclick='Pn.checkbox("ids",this.checked)'/></th>
	<th>楼盘名称</th>
	<th>区域</th>
	<th>出卖人</th>
	<th>预售许可证号</th>
	<th>用途</th>
	<th>建筑类型</th>
	<th>建筑面积</th>
	<th>套内面积</th>
	<th>分摊面积</th>
	<th>成交金额</th>
	<th>建面单价</th>
	<th>套内单价</th>
	<th>合同时间</th>
</tr>
</thead><!-- 	modelMap.put("name",cmsHouseDataMng.getAllRow("name") );
		modelMap.put("area",cmsHouseDataMng.getAllRow("area") );
		modelMap.put("seller",cmsHouseDataMng.getAllRow("seller") );
		modelMap.put("use",cmsHouseDataMng.getAllRow("use") );
		modelMap.put("building",cmsHouseDataMng.getAllRow("building") );
		modelMap.put("covered",cmsHouseDataMng.getAllRow("covered") );
		modelMap.put("sets",cmsHouseDataMng.getAllRow("sets") );
		modelMap.put("turnover",cmsHouseDataMng.getAllRow("turnover") );
		modelMap.put("surface",cmsHouseDataMng.getAllRow("surface") );
		modelMap.put("sleeve",cmsHouseDataMng.getAllRow("sleeve") );
		modelMap.put("contractTime",cmsHouseDataMng.getAllRow("contractTime") ); -->
<tbody  class="pn-ltbody">
<tr onmouseover="this.bgColor='#eeeeee'">
    <td></td>
	<td><select style="width: 100%" name="name_select" id="name_select" onchange="go_search(this);"><option value="all">全部</option><option value="zdy">自定义</option></select></td>
	<td><select style="width: 100%" name="area_select" id="area_select" onchange="go_search(this);"><option value="all">全部</option><option value="zdy">自定义</option></select></td>
	<td><select style="width: 100%" name="seller_select" id="seller_select" onchange="go_search(this);"><option value="all">全部</option><option value="zdy">自定义</option></select></td>
	<td></td>
	<td><select style="width: 100%"name="use_select" id="use_select" onchange="go_search(this);"><option value="all">全部</option><option value="zdy">自定义</option></select></td>
	<td><select style="width: 100%" name="building_select" id="building_select" onchange="go_search(this);"><option value="all">全部</option><option value="zdy">自定义</option></select></td>
	
	<td><select style="width: 100%" name="building_area_select" id="building_area_select" onchange="go_search(this);">
	
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option>
	<option value="zdy">自定义</option>
	</select>
	</td>
	<td><select style="width: 100%" name="inside_area_select" id="inside_area_select" onchange="go_search(this);">
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option>
	<option value="zdy">自定义</option>
	</select>
	</td>
	<td></td>
	<td><select style="width: 100%" name="price_select" id="price_select" onchange="go_search(this);">
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option>
	<option value="zdy">自定义</option>
	</select></td>
	
	<td><select style="width: 100%" name="building_price_select" id="building_price_select" onchange="go_search(this);">
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option>
	<option value="zdy">自定义</option>
	</select>
	</td>
	<td>
	<select style="width: 100%" name="inside_price_select" id="inside_price_select" onchange="go_search(this);">
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option></select>
	</td>
	<td>
	<select style="width: 100%" name="date_select" id="date_select" onchange="go_search(this);">
	<option value="all">全部</option>
	<option value="up">升序</option>
	<option value="down">降序</option>
	<option value="zdy">自定义</option>
	</select>
	</td>
</tr>

<#list pagination.list as bean>
<tr onmouseover="this.bgColor='#eeeeee'" onmouseout="this.bgColor='#ffffff'">
    <td><input type='checkbox' name='ids' value='${bean.id!}'/></td>
	<td>${bean.name}</td>
	<td>${bean.area}</td>
	<td>${bean.seller?substring(0,5)}</td>
	<td>${bean.license?substring(0,5)}</td>
	<td>${bean.use}</td>
	<td>${bean.building}</td>
	<td>${bean.covered}</td>
	<td>${bean.sets}</td>
	<td>${bean.share}</td>
	<td>${bean.turnover}</td>
	<td>${bean.surface}</td>
	<td>${bean.sleeve}</td>
	<td>${bean.contractTime?string('yyyy-MM-dd')}</td>
</tr>
</#list>
</tbody>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="pn-sp">
	共 ${pagination.getTotalCount()}条&nbsp;
	每页<input type="text" value="${pagination.pageSize}" style="width:30px" onfocus="this.select();" onblur="$.cookie('_cookie_page_size',this.value,{expires:3650});" onkeypress="if(event.keyCode==13){$(this).blur();return false;}"/>条&nbsp;
	<input class="first-page" type="button" value="首 页" onclick="_gotoPage('1');" <#if (pagination.getPageNo() = 1) > disabled="disabled" </#if> />
	<input class="pre-page" type="button" value="上一页" onclick="_gotoPage('${pagination.getPageNo() - 1}');" <#if (pagination.getPageNo()-1 < 1) > disabled="disabled" </#if> />
	<input class="next-page" type="button" value="下一页" onclick="_gotoPage('${pagination.getPageNo() + 1}');"<#if (pagination.getPageNo()+1 > pagination.getTotalPage()) > disabled="disabled" </#if> />
	<input class="last-page" type="button" value="尾 页" onclick="_gotoPage('${pagination.getTotalPage()}');" <#if (pagination.getPageNo() == pagination.getTotalPage()) > disabled="disabled" </#if> />&nbsp;
	当前 ${pagination.getPageNo()}/${pagination.getTotalPage()}页 &nbsp;转到第<input type="text" id="_goPs" style="width:50px" onfocus="this.select();" onkeypress="if(event.keyCode==13){$('#_goPage').click();return false;}"/>页
	<input class="go" id="_goPage" type="button" value="转" onclick="_gotoPage($('#_goPs').val());" <#if (pagination.getTotalPage() < 1) > disabled="disabled" </#if> />
</td>
</tr>
</table>
<script type="text/javascript">
function _gotoPage(pageNo) {
	try{
		var tableForm = getTableForm();
		$("input[name=pageNo]").val(pageNo);
		tableForm.action="v_list.do";
		tableForm.onsubmit=null;
		tableForm.submit();
	} catch(e) {
		alert('_gotoPage(pageNo)方法出错');
	}
}


function go_search(obj){
	var type=obj.id;//看看是点击的哪一个下拉选项
	if(type=="date_select"){//选择的是时间
	
	}else if(type=="date_select"){
	
	}else if(type=="inside_price_select"){//选择的是套内单价
	
	}else if(type=="building_price_select"){//选择的是键面单价
	
	}else if(type=="price_select"){//选择的是成交金额
	
	}else if(type=="inside_area_select"){//选择的是套内面积
	
	}else if(type=="building_area_select"){//选择的是建筑面积
	
	}else if(type=="building_select"){//选择的是建筑类型
	
	}else if(type=="use_select"){//选择的是用途
	
	}else if(type=="seller_select"){//选择的是出卖人
	
	}else if(type=="area_select"){//选择的是区域
	
	}else if(type=="name_select"){//选择的是楼盘名称
	
	}
}
</script>
</form>
<div style="margin-top:15px;"><input class="del-button" type="button" value="删除" onclick="optDelete();"/></div>
</div>
</body>
</html>